<?php

/* 已经支付的订单 report_order */
class ReportorderModel extends BaseModel
{
    var $table  = 'report_order';
    var $alias  = 'order_p';
    var $prikey = 'order_id';
    var $_name  = 'reportorder';
    var $_relation  = array(
        // 一个订单有一个订单结算状态表
        'has_orderclearing' => array(
            'model'         => 'orderclearing',
            'type'          => HAS_ONE,
            'refer_key' => 'order_id',
            'foreign_key' => 'order_id',
            'dependent'     => true
        ),
        // 一个订单有多个订单商品
        'has_reportrec' => array(
            'model'         => 'reportrec',
            'type'          => HAS_MANY,
            'refer_key' => 'order_id',
            'foreign_key' => 'order_id',
            'dependent'     => true
        ),

    );

}

?>
